import ReactDOM from 'react-dom/client';
import 'dayjs/locale/zh-cn';
import locale from 'antd/locale/zh_CN';
import { BrowserRouter } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import { Provider } from 'mobx-react';

import { globalStore } from '@stores/global';

import App from './App';
import './index.less';

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
  <ConfigProvider locale={locale}>
    <Provider globalStore={globalStore}>
      <BrowserRouter>
        <App />
      </BrowserRouter>
    </Provider>
  </ConfigProvider>
);
